package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCgzqImportMapper;
import com.ruoyi.system.domain.SysCgzqImport;
import com.ruoyi.system.service.ISysCgzqImportService;

/**
 * SysCgzqImportService业务层处理
 * 
 * @author SYF
 * @date 2025-05-14
 */
@Service
public class SysCgzqImportServiceImpl implements ISysCgzqImportService 
{
    @Autowired
    private SysCgzqImportMapper sysCgzqImportMapper;

    /**
     * 查询SysCgzqImport
     * 
     * @param pcode SysCgzqImport主键
     * @return SysCgzqImport
     */
    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public SysCgzqImport selectSysCgzqImportByPcode(String pcode)
    {
        return sysCgzqImportMapper.selectSysCgzqImportByPcode(pcode);
    }

    /**
     * 查询SysCgzqImport列表
     * 
     * @param sysCgzqImport SysCgzqImport
     * @return SysCgzqImport
     */
    @Override
    public List<SysCgzqImport> selectSysCgzqImportList(SysCgzqImport sysCgzqImport)
    {
        return sysCgzqImportMapper.selectSysCgzqImportList(sysCgzqImport);
    }

    /**
     * 新增SysCgzqImport
     * 
     * @param sysCgzqImport SysCgzqImport
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public int insertSysCgzqImport(SysCgzqImport sysCgzqImport)
    {
        return sysCgzqImportMapper.insertSysCgzqImport(sysCgzqImport);
    }

    /**
     * 修改SysCgzqImport
     * 
     * @param sysCgzqImport SysCgzqImport
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public int updateSysCgzqImport(SysCgzqImport sysCgzqImport)
    {
        return sysCgzqImportMapper.updateSysCgzqImport(sysCgzqImport);
    }

    /**
     * 批量删除SysCgzqImport
     * 
     * @param pcodes 需要删除的SysCgzqImport主键
     * @return 结果
     */
    @Override
    public int deleteSysCgzqImportByPcodes(String[] pcodes)
    {
        return sysCgzqImportMapper.deleteSysCgzqImportByPcodes(pcodes);
    }

    /**
     * 删除SysCgzqImport信息
     * 
     * @param pcode SysCgzqImport主键
     * @return 结果
     */
    @Override
    public int deleteSysCgzqImportByPcode(String pcode)
    {
        return sysCgzqImportMapper.deleteSysCgzqImportByPcode(pcode);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<Map<String,Object>> selectCgzqImport(){
        return sysCgzqImportMapper.selectCgzqImport();
    }
}
